<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<h3>父组件</h3>
			<hr />
			<stu>
				<template v-slot:s1>
					<h5>博为峰</h5>
				</template>
				<template #s2>
					<h5>学掌门</h5>
				</template>
				<h5>29期</h5>
			</stu>
		</div>
		<template id="stu">
			<div>

				<h3>学生组件</h3>
				<!-- 插槽 -->
				<slot name="s1"></slot>
				<slot name="s2"></slot>
			</div>
		</template>
		<script type="text/javascript">
			const vm = new Vue({
				el: '#app',
				components: {
					stu: {
						template: '#stu'
					}
				},
			})
			console.log(vm);
		</script>
	</body>
</html>
